package com.miage.utils;

public class Constante {
	
	// EVENEMENT
	public static final String EVENEMENT_TABLE = "EVENEMENT";
	public static final String EVENEMENT_COLUMN_ID = "_id";
	public static final String EVENEMENT_COLUMN_NOM = "nom";
	public static final String EVENEMENT_COLUMN_DATE_DEBUT = "dateDebut";
	public static final String EVENEMENT_COLUMN_DATE_FIN = "dateFin";
	
	public static final String EVENEMENT_TABLE_CREATE =
			"CREATE TABLE " + EVENEMENT_TABLE + "("
			+ EVENEMENT_COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " 
			+ EVENEMENT_COLUMN_NOM + " TEXT, " 
			+ EVENEMENT_COLUMN_DATE_DEBUT + " TEXT, "
			+ EVENEMENT_COLUMN_DATE_FIN + " TEXT);";
	
	public static final String EVENEMENT_TABLE_DROP = "DROP TABLE IF EXISTS " + EVENEMENT_TABLE + ";";
	
	
	// DEPENSE
	public static final String DEPENSE_TABLE = "DEPENSE";
	public static final String DEPENSE_COLUMN_ID = "_id";
	public static final String DEPENSE_COLUMN_NOM = "nom";
	public static final String DEPENSE_COLUMN_DESCRIPTION = "description";
	public static final String DEPENSE_COLUMN_MONTANT = "montant";
	public static final String DEPENSE_COLUMN_DATE = "date";
	public static final String DEPENSE_COLUMN_TYPE_DEBIT = "typeDebit";
	public static final String DEPENSE_COLUMN_TYPE_PAIEMENT = "typePaiement";
	public static final String DEPENSE_FOREIGNKEY_ID_PARTICIPANT = "idParticipant";
	public static final String DEPENSE_FOREIGNKEY_ID_EVENEMENT = "idEvenement";
	
	public static final String DEPENSE_TABLE_CREATE = 
			"CREATE TABLE " + DEPENSE_TABLE + " ("
			+ DEPENSE_COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ DEPENSE_COLUMN_NOM + " TEXT , "
			+ DEPENSE_COLUMN_DESCRIPTION + " TEXT, "
			+ DEPENSE_COLUMN_MONTANT + " REAL, "
			+ DEPENSE_COLUMN_DATE + " TEXT, "
			+ DEPENSE_COLUMN_TYPE_DEBIT + " TEXT, "
			+ DEPENSE_COLUMN_TYPE_PAIEMENT + " TEXT, "
			+ DEPENSE_FOREIGNKEY_ID_PARTICIPANT + " INTEGER, "
			+ DEPENSE_FOREIGNKEY_ID_EVENEMENT + " INTEGER"
			+ ");";
	
	public static final String DEPENSE_TABLE_DROP = "DROP TABLE IF EXISTS " + DEPENSE_TABLE + ";";
	
	
	// PARTICIPANT
	public static final String PARTICIPANT_TABLE = " PARTICIPANT";
	public static final String PARTICIPANT_COLUMN_ID = "_id";
	public static final String PARTICIPANT_COLUMN_NOM = "nom";
	public static final String PARTICIPANT_COLUMN_PRENOM = "prenom";
	public static final String PARTICIPANT_COLUMN_MONTANT_CPTE = "montantCpte";
	public static final String PARTICIPANT_FOREIGNKEY_ID_EVENEMENT = "idEvenement";
	
	public static final String PARTICIPANT_TABLE_CREATE = 
			"CREATE TABLE " + PARTICIPANT_TABLE + "("
			+ PARTICIPANT_COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " 
			+ PARTICIPANT_COLUMN_NOM + " TEXT, " 
			+ PARTICIPANT_COLUMN_PRENOM + " TEXT, " 
			+ PARTICIPANT_COLUMN_MONTANT_CPTE + " FLOAT DEFAULT 0, "
			+ PARTICIPANT_FOREIGNKEY_ID_EVENEMENT + " INTEGER);";
		
	public static final String PARTICIPANT_TABLE_DROP = "DROP TABLE IF EXISTS " + PARTICIPANT_TABLE + ";";
		
}
